<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1 id="t"></h1>
<script>
   var h = document.getElementById('t');
   var s = '<font color="red">hello-font tag</font>';
   //s = 'ok';
   h.innerHTML = s;
   h.innerText = s;  //不支持标签，兼容不好
</script>
</body>
</html>